<template>
  <div>
    <!--引用表格-->
   <BasicTable @register="registerTable" :rowSelection="rowSelection">
     <!--插槽:table标题-->
          <template #tableTitle>
             <a-button  type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
          </template>
    </BasicTable>

  </div>
</template>

<script lang="ts" name="moyan-reportOverview" setup>
  import {BasicTable} from '/@/components/Table';
  import { useListPage } from '/@/hooks/system/useListPage'
  import {columns, searchFormSchema} from './ReportOverview.data';
  import {list,getExportUrl} from './ReportOverview.api';

  //注册table数据
  const { prefixCls,tableContext,onExportXls } = useListPage({
     pagination: false,
     tableProps:{
       rowKey: 'cid',
       title: ' 会员摘要',
       api: list,
       columns,
       canResize:false,
       formConfig: {
         labelWidth: 120,
         schemas: searchFormSchema,
         autoSubmitOnEnter:true,
         showAdvancedButton:true,
       },
       showActionColumn: false,

      },
      exportConfig: {
         name:" 渠道当日统计",
         url: getExportUrl,
     },

   })

   const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext




</script>
<style scoped>

</style>
